<?php
include('connect.php');
$ss="update sf_guard_user set is_online=1 where id = ".$_GET['i'];
mysql_query($ss);
$ss="select id, from_id from chat_room where to_id=".$_GET['i']." and accept=0";
//echo $ss;
$sd = "select account, gender from sf_guard_user where id = ".$_GET['i'];
$red = mysql_query($sd);
list($account, $gender) = mysql_fetch_row($red);

$rez = mysql_query($ss);
$cnt = mysql_num_rows($rez);
if($cnt>0)
{
   
   list($id, $from_id) = mysql_fetch_row($rez);
  
   $s = "select first_name, photo from sf_guard_user where id=".$from_id;
   $r = mysql_query($s);
   list($fn, $p) = mysql_fetch_row($r);
  
   ?>
   <div class="modal" id="yesno"> Call to chat from <a href="/profile/show?id=<?php echo $from_id?>"><?php echo $fn ?></a><br /><br />

<div style="float: left">

</div>

<div style="float: right">
<?php if($account<=0 and $gender=='m'): ?>
You account is not enough money!<br />
Top-up account, you can <a href="/en/account_index.html">hire</a><br />
<a href="/chat/reject?id=<?= $id ?>">Cancel</a><br /> 
<?php else: ?>
<a href="/chat/answer?video=yes&id=<?= $id ?>">Accept the challenge with video</a><br />
<a href="/chat/answer?video=no&id=<?= $id ?>">Accept the challenge without video</a><br />
<a href="/chat/reject?id=<?= $id ?>">Cancel</a><br />

<?php endif ?>
</div>

<object type="application/x-shockwave-flash" data="http://www.alika-love-agency.com/ump3player_500x70.swf" height="1" width="1"><param name="wmode" VALUE="transparent" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://www.alika-love-agency.com/ump3player_500x70.swf" /><param name="FlashVars" value="way=http://www.alika-love-agency.com/signal.mp3&amp;swf=http://www.alika-love-agency.com/ump3player_500x70.swf&amp;w=1&amp;h=0&amp;time_seconds=0&amp;autoplay=1&amp;q=&amp;skin=grey&amp;volume=70&amp;comment=" /></object>

<?php if($p!=''):?>
<div class="close" style="float:left"></div>
<img src="/uploads/users/avatar/_thumbnail/<?= $p ?>">
</div>
<?php endif ?>

<script>
$("#yesno").overlay({
    
    closeOnClick: true,   
    api: true
}).load();
</script>
<?php
}
else
{
   echo '';
}
?>